
class MovieList extends React.Component {
    constructor() {
        super()
        this.state = {
            movie: ["星际穿越", "大话西游", "盗梦空间", "少年派", "ccc"]
        }
    }

    render() {
        return (
            <div>
                <h1>电影列表</h1>
                <ul>
                    {
                        this.state.movie.map((movie, index) => {
                            return <li>{movie}</li>
                        })
                    }
                </ul>
            </div>
        )
    }
}

let rootContainer = document.getElementById("root")
ReactDOM.render(
    <MovieList />,
    rootContainer)